package wheres.mijao;

import java.text.ChoiceFormat;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.ImageButton;
import android.widget.ImageView;

public class WheresMijaoActivity extends Activity {

	ImageButton botaoJogar, botaoRanking, botaoInstrucoes, botaoSair;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		/*
		 * MediaPlayer music = MediaPlayer.create(this, R.raw.mainmusic1);
		 * music.setLooping(true); music.start();
		 */

		botaoJogar = (ImageButton) findViewById(R.id.botaoJogar);
		botaoRanking = (ImageButton) findViewById(R.id.botaoRanking);
		botaoInstrucoes = (ImageButton) findViewById(R.id.botaoInstrucoes);
		botaoSair = (ImageButton) findViewById(R.id.botaoSair);

		botaoJogar.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent troca = new Intent(WheresMijaoActivity.this,
						MapaFase.class);
				WheresMijaoActivity.this.startActivity(troca);
				WheresMijaoActivity.this.finish();

			}
		});

		botaoRanking.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent troca = new Intent(WheresMijaoActivity.this,
						MapaRanking.class);
				WheresMijaoActivity.this.startActivity(troca);
				WheresMijaoActivity.this.finish();

			}
		});

		botaoInstrucoes.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent troca = new Intent(WheresMijaoActivity.this,
						Instrucoes.class);
				WheresMijaoActivity.this.startActivity(troca);
				WheresMijaoActivity.this.finish();

			}
		});

		botaoSair.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				try {
					WheresMijaoActivity.this.finalize();
					WheresMijaoActivity.this.finish();
				} catch (Throwable e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

			}
		});

	}
}